# coding=UTF-8
import redis

#环境配置
class Config(object):

    #开启调试
    DEBUG = True

    #SQLAlchemy
    SQLALCHEMY_DATABASE_URI = "mysql://root:mysql@127.0.0.1:3306/ihome"
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    #redis
    REDIS_HOST = '127.0.0.1'
    REDIS_POST = 6379

    #session
    SESSION_KEY = 'nCf5E3TpSquMe4QW6ESdj6drtBOF8BS9I77oTZ73eSxNUEz6dtf3gKNtvIcCZY2u'

    #SESSION
    SESSION_TYPE = "redis"
    SESSION_REDIS = redis.StrictRedis(host=REDIS_HOST,port=REDIS_POST)
    SESSION_USE_SIGNER = True
    PERMANENT_SESSION_LIFETIME = 86400